package com.xyz.basesdk.base;

import org.greenrobot.eventbus.EventBus;

/**
 * @author mac
 * on 2018/6/25.
 */
public class BasePresenter<V extends IView> implements IPresenter {
    public V mView;

    public BasePresenter(V mView) {
        this.mView = mView;
        EventBus.getDefault().register(this);
    }

    @Override
    public void onStart() {

    }

    @Override
    public void cancelNetWork() {

    }

    @Override
    public void cancelEventBus() {
        EventBus.getDefault().unregister(this);
    }

    @Override
    public void onDestroy() {
        cancelNetWork();
        cancelEventBus();
    }
}
